/*
Author: Ross Clement
The Player class holds the username of the player as well as their statistics.
 */

class Player implements Comparable<Player> {

    private String username;
    private String password;
    Statistics stats;

    //Constructor, creates a new Player with a supplied username
    Player(String name) {
        username = name;
        password = "";
        stats = new Statistics();
    }

    //Accessor method to return the username as a String
    String getName() {
        return username;
    }

    String getPassword() {
        return password;
    }

    void setPassword(String newPass) {
        password = newPass;
    }

    //Method to change the username
    void setName(String newName) {
        username = newName;
    }

    public int compareTo(Player o) {
        return username.compareTo(o.username);
    }
}
